home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / pyxmpp / stream.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2008-10-13  |  2KB  |  53 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. __revision__ = '$Id: stream.py 678 2008-08-08 11:22:14Z jajcus $'
  5. __docformat__ = 'restructuredtext en'
  6. import logging
  7. from pyxmpp.streambase import StreamBase
  8. from pyxmpp.streamtls import StreamTLSMixIn
  9. from pyxmpp.streamsasl import StreamSASLMixIn
  10.  
  11. class Stream(StreamTLSMixIn, StreamSASLMixIn, StreamBase):
  12.     
  13.     def __init__(self, default_ns, extra_ns = (), sasl_mechanisms = (), tls_settings = None, keepalive = 0, owner = None):
  14.         StreamBase.__init__(self, default_ns, extra_ns, keepalive, owner)
  15.         StreamTLSMixIn.__init__(self, tls_settings)
  16.         StreamSASLMixIn.__init__(self, sasl_mechanisms)
  17.         self._Stream__logger = logging.getLogger('pyxmpp.Stream')
  18.  
  19.     
  20.     def _reset(self):
  21.         StreamBase._reset(self)
  22.         self._reset_tls()
  23.         self._reset_sasl()
  24.  
  25.     
  26.     def _make_stream_features(self):
  27.         features = StreamBase._make_stream_features(self)
  28.         self._make_stream_tls_features(features)
  29.         self._make_stream_sasl_features(features)
  30.         return features
  31.  
  32.     
  33.     def _process_node(self, xmlnode):
  34.         if self._process_node_tls(xmlnode):
  35.             return None
  36.         
  37.         if self._process_node_sasl(xmlnode):
  38.             return None
  39.         
  40.         StreamBase._process_node(self, xmlnode)
  41.  
  42.     
  43.     def _got_features(self):
  44.         self._handle_tls_features()
  45.         self._handle_sasl_features()
  46.         StreamBase._got_features(self)
  47.         if not (self.tls_requested) and not (self.authenticated):
  48.             self.state_change('fully connected', self.peer)
  49.             self._post_connect()
  50.         
  51.  
  52.  
  53.